package com.quanyan.ic.http.dao;

import com.quanyan.ic.common.paging.Limit;
import com.quanyan.ic.http.dao.entry.LightAlarmEntry;
import com.quanyan.ic.http.dao.sqlprovider.LightAlarmSqlProvider;
import com.quanyan.ic.http.entity.resp.RespAlarmsDetails;
import com.quanyan.ic.http.entity.resp.RespAlarmsTotal;
import com.quanyan.ic.http.entity.resp.RespSportsException;
import com.quanyan.ic.http.entity.resp.RespTimeNums;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;
import java.util.Map;

/**
 * Created by zhuo.shi on 2017/7/21.
 */
@Mapper
public interface LightAlarmMapper {

    @SelectProvider(type = LightAlarmSqlProvider.class, method = "queryLightAlarmList")
    List<LightAlarmEntry> queryLightAlarmList(Map<String, Object> params, Limit limit);

    @SelectProvider(type = LightAlarmSqlProvider.class, method = "countLightAlarmList")
    Integer countLightAlarmList(Map<String, Object> params);

    /**
     * 汇总
     *
     * @param params
     * @return
     */
    @SelectProvider(type = LightAlarmSqlProvider.class, method = "totalLightAlarms")
    List<RespAlarmsTotal> totalLightAlarms(Map<String, Object> params);


    /**
     * 求分钟和
     *
     * @param params
     * @return
     */
    @SelectProvider(type = LightAlarmSqlProvider.class, method = "sumLightMinutes")
    RespSportsException sumLightMinutes(Map<String, Object> params);


    /**
     * 求分钟和
     *
     * @param params
     * @return
     */
    @SelectProvider(type = LightAlarmSqlProvider.class, method = "queryLightList")
    List<RespAlarmsDetails> queryLightList(Map<String, Object> params);


    /**
     * 求分钟和
     *
     * @param params
     * @return
     */
    @SelectProvider(type = LightAlarmSqlProvider.class, method = "alarmsGroupByStart")
    List<RespTimeNums> alarmsGroupByStart(Map<String, Object> params);


}
